[XEND] Fix XenAPI Host interface so that get_record works.
authorAlastair Tse <atse@xensource.com>
Thu, 5 Oct 2006 18:13:52 +0000 (19:13 +0100)
committerAlastair Tse <atse@xensource.com>
Thu, 5 Oct 2006 18:13:52 +0000 (19:13 +0100)
Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xend/XendAPI.py
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/XendNode.py

index f13a9e08355b4a7798f5e8e38d1c0a7356b627a1..cc78cff9dd907b8023e8eee24ed3e2ee765aab8f 100644 (file)
@@ -382,8 +382,8 @@ class XendAPI:
     def host_get_record(self, session, host_ref):
         node = XendNode.instance()
         dom = XendDomain.instance()
-        record = {'name/label': node.name,
-                  'name/description': '',
+        record = {'name_label': node.name,
+                  'name_description': '',
                   'software_version': node.xen_version(),
                   'resident_VMs': dom.get_domain_refs(),
                   'host_CPUs': node.get_host_cpu_refs()}
index bbb5192bca21b92665dfb6be89741f52abb99ad9..604c298db5b143caa560a8f0ea72cc9456b1e485 100644 (file)
@@ -549,7 +549,7 @@ class XendDomain:
         result = []
         try:
             self.domains_lock.acquire()
-            result = [d.getVMRef() for d in self.domains]
+            result = [d.get_uuid() for d in self.domains.values()]
         finally:
             self.domains_lock.release()
         return result
index b6612a9692915a78ae9c4688258a4316aef54b4e..789c26cd9b43b6921a7d32c3107ea87f8e21d2ba 100644 (file)
@@ -44,7 +44,7 @@ class XendNode:
                         'host': self.uuid,
                         'number': i,
                         'features': cpu_features}
-            self.cpus[uuid] = cpu_info
+            self.cpus[cpu_uuid] = cpu_info
 
     def shutdown(self):
         return 0